package com.sumainfor.pc.epc.feign.Zfeign;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.epc.fallback.ZfallBack.ZpcMarketFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 调用市场部服务
 */
@FeignClient(name = "tANGNEST-PC-MARKEt", fallback = ZpcMarketFallback.class)
public interface ZpcMktFeign {
    /**
     * 查询所有的房源名称（用于下拉框筛选）
     *
     * @param
     * @return
     */
    @GetMapping("/key/CommunityZfeign/getCommunityName")
    JsonResult getCommunityName();

    /**
     * 根据房源编号到市场部查询房源的基本信息
     *
     * @return
     */
    @PostMapping("/key/CommunityZfeign/getCommunityList")
    JsonResult getCommunityList(@RequestBody Map<String, Object> params
            , @RequestParam("pager") Pager pager);

    /**
     * 运营部租后主管退租账单列表去市场部查询房间信息
     */
    @ResponseBody
    @PostMapping("/rentadviser/RdHousingController/key/getHouInfoListForRepair")
    JsonResult getHouInfoListForRepair(@RequestBody Map<String, Object> params);


    /**
     * 根据房源配置主表编号到市场部查询房源的基本信息
     */
    @ResponseBody
    @PostMapping("/key/CommunityGet/getCommunityLists")
    JsonResult getCommunityLists(@RequestBody Map<String, Object> params, @RequestParam("pager") Pager pager);

    @ResponseBody
    @PostMapping("/key/CommunityGetExtension/getCommunityListss")
    JsonResult getCommunityListss(@RequestBody Map<String, Object> params);

    @ResponseBody
    @PostMapping("/key/CommunityGetExtension/getCommunityListHid")
    JsonResult getCommunityListHid(@RequestBody Map<String, Object> params);

    /**
     * 维修师傅根据获取项目编号列表
     */
    @ResponseBody
    @PostMapping("/key/CommunityZfeign/getComIdList")
    JsonResult getComIdList(@RequestBody Map<String, Object> params);

    /**
     * 维修师傅根据获取项目编号列表
     */
    @ResponseBody
    @PostMapping("/key/CommunityZfeign/getHouIdList")
    JsonResult getHouIdList(@RequestBody Map<String, Object> params);

    /**
     * 通过房源编号获取对应房源房源信息
     */
    @ResponseBody
    @PostMapping("/key/CommunityZfeign/getHouIdInfoList")
    JsonResult getHouIdInfoList(@RequestBody Map<String, Object> params);

    /**
     * 服务管家验房新增房源配置
     */
    @ResponseBody
    @PostMapping("/rentadviser/RdHousingCon/key/addHouCon")
    JsonResult addHouCon(@RequestBody Map<String, Object> params);

    /**
     * 根据房源配置主表编号查询房源信息
     */
    @ResponseBody
    @PostMapping("/key/maintenanceHouCon/getHouConList")
    JsonResult getHouConList(@RequestBody Map<String, Object> params);

    /**
     * 根据房源编号查询房源信息
     */
    @ResponseBody
    @PostMapping("/key/maintenanceHouCon/getHouIdLists")
    JsonResult getHouIdLists(@RequestBody Map<String, Object> params);

    /**
     * 待审核配置房源数量
     */
    @ResponseBody
    @GetMapping("/key/HousingInfoState/getAuditHousingCount")
    JsonResult getAuditHousingCount();

    /**
     * 待审核配置房源
     */
    @ResponseBody
    @GetMapping("/key/HousingInfoState/getAuditHousing")
    JsonResult getAuditHousing(@RequestParam Map<String, Object> params, @RequestParam("pager") Pager pager);
    /**
     * 待审核配置房源
     */
    @PostMapping("/rentadviser/RdHousingController/key/getRdAlterList")
    JsonResult getRdAlterList(@RequestBody Map<String, Object> params);


    ///////////////////////////////////////////////////////////////////////////
    // ----------
    ///////////////////////////////////////////////////////////////////////////


    /**
     * 根据房源编号过滤这个项目下的房源信息
     *
     * @param params hIds :Array
     *               val :String
     *               col :String
     *               where :String
     * @return
     */
    @PostMapping("/key/hou/selectComIdByHId")
    JsonResult selectComIdByHId(@RequestBody Map<String, Object> params);

    /**
     * 根据房源主编号查询房源基本信息资料数据
     *
     * @param hIds
     * @return
     */
    @PostMapping("/key/hou/selectHousingDetailByArray")
    JsonResult selectHousingDetailByArray(@RequestBody Collection<String> hIds);


    /**
     * 通过小区名称搜素小区编号集合
     *
     * @param comName
     * @return
     */
    @PostMapping("/key/provider/search/selectProjectIdList")
    JsonResult selectProjectIdList(@RequestParam("comName") String comName);


    /**
     * 根据房源编号查询管家编号
     *
     */
    @PostMapping("/key/TcmktHousingSysUserId/getTcmktHousSysUserId")
    JsonResult getTcmktHousSysUserId(@RequestBody Map<String,Object> params);

    /**
     * 通过项目编号, 楼号, 室号, 查到所有的房源id数组
     **/
    @GetMapping("/housing/getHouseIdListByBuildAndRoom")
    List<String> getHouseIdListByBuildAndRoom(@RequestParam Map<String, Object> params);


    @PostMapping("/key/maintenanceHouCon/updatePayment")
     JsonResult updatePayment(@RequestBody Map<String,Object> params);



    @PostMapping("/key/provider/search/getHouEpc")
    Map<String,Object> getHouEpc(@RequestBody Map<String,Object> params);


   @PostMapping("/key/HouCaiWu/getHoulist")
    List<Map<String,Object>> getHoulist(@RequestBody Map<String,Object> params);

}
